<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head> 
	<meta name="decorator" content="moduleList"/> 
	<link href="${staticPath}/lib/datetimepicker/0.0.11/css/bootstrap-datetimepicker.min.css" rel="stylesheet" type="text/css">
	<link href="${staticPath}/lib/chosen/1.1.0/chosen.min.css" rel="stylesheet" type="text/css">
	<link rel="stylesheet" href="${staticPath}/lib/ztree/3.5/css/zTreeStyle/zTreeStyle.css" type="text/css">
</head>
<body>
	<ol class="breadcrumb">
		<li><a href="${contextPath}/index">首页</a></li>
		<li><a href="${contextPath}/biz/example/form/elements?navId=${navId}">流程管理</a></li>
		<li class="active">对话框</li>
	</ol>
	<div class="panel panel-default">
	  <div class="panel-heading">
	    <h3 class="panel-title">对话框
	    <a class="btn btn-default btn-sm pull-right o-a-button" role="button" href="javascript:void(0)" onclick="history.go(-1)">返回</a>
	    </h3>
	  </div>
	  <div class="panel-body">
		<form role="form" class="form-horizontal">
	  		<div class="form-group">
				<label for="name" class="col-sm-2 control-label">区域单选:</label>
				<div class="col-sm-10">
					<input type="hidden" id="regionId"> 
					<div class="input-group">
				      <input type="text" class="form-control" id="regionName" readonly="readonly">
				      <span class="input-group-btn">
				        <button class="btn btn-primary" id="regionDialog" type="button">
				        	选择
				        </button>
				      </span>
				    </div>
				</div>
			</div>
			<div class="form-group">
				<label for="name" class="col-sm-2 control-label">区域多选:</label>
				<div class="col-sm-10">
					<input type="hidden" id="regionId2"> 
					<div class="input-group">
				      <input type="text" class="form-control" id="regionName2" readonly="readonly">
				      <span class="input-group-btn">
				        <button class="btn btn-primary" id="regionDialogMultiple" type="button">
				        	选择
				        </button>
				      </span>
				    </div>
				</div>
			</div>
			<div class="form-group">
				<label for="name" class="col-sm-2 control-label">人员选择:</label>
				<div class="col-sm-10">
					<input type="hidden" id="userId"> 
					<div class="input-group">
				      <input type="text" class="form-control" id="userName" readonly="readonly">
				      <span class="input-group-btn">
				        <button class="btn btn-primary" id="userDialogMultiple" data-dialog="dialog" data-multiple="true" data-idField="userId" data-nameField="userName" data-authType="USER" type="button">
				        	选择
				        </button>
				      </span>
				    </div>
				</div>
			</div>
			<div class="form-group">
				<label for="name" class="col-sm-2 control-label">通用岗位选择:</label>
				<div class="col-sm-10">
					<input type="hidden" id="generallPostId"> 
					<div class="input-group">
				      <input type="text" class="form-control" id="generallPostName" readonly="readonly">
				      <span class="input-group-btn">
				        <button class="btn btn-primary" id="generallPostDialog" data-dialog="dialog" data-idField="generallPostId" data-nameField="generallPostName" data-authType="GENERAL_POST" type="button">
				        	选择
				        </button>
				      </span>
				    </div>
				</div>
			</div>
	  	</form>
	  </div>
	</div>	
	<!-- 选择对话框依赖的js -->
	<script src="${staticPath}/lib/ztree/3.5/js/jquery.ztree.all-3.5.js" type="text/javascript"></script>
	<script src="${staticPath}/js/jquery-dialog.js" type="text/javascript"></script>
	<script type="text/javascript">
		$(document).ready(function (){
			//单选对话框
			var opt = {
					service: "selectRegionDataService",
					idField: "regionId",
					nameField: "regionName",
					title: "地区选择对话框"
				};
			$("#regionDialog").Dialog(opt);
			//多选对话框
			var opt2 = {
					service: "selectRegionDataService",
					idField: "regionId2",
					nameField: "regionName2",
					multiple: "true",
					title: "地区选择对话框"
				};
			$("#regionDialogMultiple").Dialog(opt2);
		});
	</script>
</body>
</html>